package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GaPropagandaMapper;
import com.ruoyi.system.domain.GaPropaganda;
import com.ruoyi.system.service.IGaPropagandaService;

/**
 * 宣传信息Service业务层处理
 * 
 * @author wzp
 * @date 2021-11-18
 */
@Service
public class GaPropagandaServiceImpl implements IGaPropagandaService 
{
    @Autowired
    private GaPropagandaMapper gaPropagandaMapper;

    /**
     * 查询宣传信息
     * 
     * @param id 宣传信息主键
     * @return 宣传信息
     */
    @Override
    public GaPropaganda selectGaPropagandaById(Long id)
    {
        return gaPropagandaMapper.selectGaPropagandaById(id);
    }

    /**
     * 查询宣传信息列表
     * 
     * @param gaPropaganda 宣传信息
     * @return 宣传信息
     */
    @Override
    public List<GaPropaganda> selectGaPropagandaList(GaPropaganda gaPropaganda)
    {
        return gaPropagandaMapper.selectGaPropagandaList(gaPropaganda);
    }

    /**
     * 新增宣传信息
     * 
     * @param gaPropaganda 宣传信息
     * @return 结果
     */
    @Override
    public int insertGaPropaganda(GaPropaganda gaPropaganda)
    {
        gaPropaganda.setCreateTime(DateUtils.getNowDate());
        return gaPropagandaMapper.insertGaPropaganda(gaPropaganda);
    }

    /**
     * 修改宣传信息
     * 
     * @param gaPropaganda 宣传信息
     * @return 结果
     */
    @Override
    public int updateGaPropaganda(GaPropaganda gaPropaganda)
    {
        return gaPropagandaMapper.updateGaPropaganda(gaPropaganda);
    }

    /**
     * 批量删除宣传信息
     * 
     * @param ids 需要删除的宣传信息主键
     * @return 结果
     */
    @Override
    public int deleteGaPropagandaByIds(Long[] ids)
    {
        return gaPropagandaMapper.deleteGaPropagandaByIds(ids);
    }

    /**
     * 删除宣传信息信息
     * 
     * @param id 宣传信息主键
     * @return 结果
     */
    @Override
    public int deleteGaPropagandaById(Long id)
    {
        return gaPropagandaMapper.deleteGaPropagandaById(id);
    }
}
